﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using BE;
using DA;
using Quadrem.ExceptionManagement;

namespace BL
{
    public class blMaquinaria
    {
        public static DataTable Obtener(beMaquinaria oBE)
        {
            DataTable dt = null;
            try
            {
                dt = daMaquinaria.Obtener(oBE);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
            }
            return dt;
        }

        public Int32 Registrar(beMaquinaria oBE)
        {
            try
            {
                return daMaquinaria.Registrar(oBE);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
                return -1;
            }
        }

        public static Int32 Eliminar(beMaquinaria oBE)
        {
            try
            {
                return daMaquinaria.Eliminar(oBE);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
                return -99;
            }
        }
    }
}
